package internal

import (
	"github.com/gin-gonic/gin"
	"mall-app/internal/contoller"
)

func InitRouter() *gin.Engine {
	r := gin.Default()
	api := r.Group("/api")
	{
		api.GET("/ping", contoller.Ping)
		api.GET("/logout", contoller.Ping)
	}

	//userApi := api.Group("/user")
	//{
	//	userApi.POST("")
	//}
	//
	//roleApi := api.Group("/role")
	//{
	//
	//}

	menuApi := api.Group("/menu")
	{
		menuApi.PUT(":id", contoller.MenuCtl.Login)

	}

	return r
}
